package com.atguigu.acyjl;

import android.content.Context;

import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;

@Database(entities = {Idiom.class,EasyIdiom.class},version = 2,exportSchema = false)
public abstract class WordDatabase extends RoomDatabase {
//    private static WordDatabase INSTANCE;
//    static synchronized  WordDatabase getDatabase(Context context){
//        if(INSTANCE == null){
//            INSTANCE = Room.databaseBuilder(context.getApplicationContext(),WordDatabase.class,"aCYJLdb")
//                    .fallbackToDestructiveMigration()
//                    .build();
//        }
//        return INSTANCE;
//    }
    public abstract WordDao getWordDao();
    public abstract EasyDao getEasyDao();
//    public abstract WordDao getWordDao();
//    多个entity 需要多个dao
}
